﻿<%--
*
*描述：信息表NET_INFORMATION的edit文件
*
* @author xyp 
*
--%>
<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%@ taglib prefix="s" uri="/struts-tags" %>
<%@taglib prefix="f" uri="/flowpage-tags"%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
  <head>
    <title><s:property value="operate"/>信息</title>
	<%@include file="/share/header.jsp"%>
	<s:head/>
        <f:header theme="${sessionScope.skinCon.pageSkin}"/>
  </head>
 
  <link rel="stylesheet" href="<%=path%>/editor/themes/default/default.css" />
  <link rel="stylesheet" href="<%=path%>/editor/plugins/code/prettify.css" />
  <script charset="utf-8" src="<%=path%>/editor/kindeditor.js"></script>
  <script charset="utf-8" src="<%=path%>/editor/lang/zh_CN.js"></script>
  <script charset="utf-8" src="<%=path%>/editor/plugins/code/prettify.js"></script>	
  <script type="text/javascript">
  
	
  	 
  </script>
 
  <body>
  <s:actionerror/>
	    <s:form  action="save" namespace="/net/information" validate="true" focusElement="domain.maintitle">	    	    
	    <div class="EasyTabs" style="width:736px;">
				  <div class="EasyMenuBox" style="width:736px;">
				    <ul class="EasyMenu" style="width:736px;">
				      <li index="1" class="hover" onclick="EasyTabs.setTab(this)" title="信息概述">信息概述</li>
				      <li index="2" onclick="EasyTabs.setTab(this)" title="信息内容">信息内容</li>
				    </ul>
				  </div>
				  <div class="EasyMainBox" style="width:736px;">
				  	<div class="EasyMain" style="width:736px;">
					   <ul index="1" class="block">
						   <li> 
						   		<s:textfield name="domain.maintitle" label="主标题"  required="true" multipleheight="1" multiplewidth="2" readonly="%{readonly}" disabled="%{disabled}" dataType="LimitB"   max="200"  maxlength="200"/>
							    <s:textfield name="domain.subtitle" label="副标题"  required="false" multipleheight="1" multiplewidth="2" readonly="%{readonly}" disabled="%{disabled}" dataType="LimitB"   max="200"  maxlength="200"/>
							    <s:textfield name="domain.keyword" label="主题词"  required="false" multipleheight="1" multiplewidth="2" readonly="%{readonly}" disabled="%{disabled}" dataType="LimitB"   max="200"  maxlength="200"/>
							    
							    <s:hidden id="channelIds" name="channelIds"/>
							 	<s:if test="readonly">
							    	<s:textfield name="channelNames" label="所属栏目" multipleheight="1" multiplewidth="1" required="true" readonly="%{readonly}" disabled="%{disabled}"  dataType="LimitB"/>		 	
							 	</s:if>
							 	<s:else>
							    	<s:textfield name="channelNames" label="所属栏目" multipleheight="1" multiplewidth="2" required="true"  dataType="LimitB"    onclick="onDoSelectTree({title:'所属栏目',type:'RoleChannel',returnIdName:'channelIds',returnTextName:'channelNames',checkbox:true,checkedValues:$('#channelIds').val(),threeState:false,require:true});" cssClass="SelectTree"/>		 	
							 	</s:else> 	
							   
							    <s:textfield name="domain.author" label="作者"  required="true" multipleheight="1" multiplewidth="1" readonly="%{readonly}" disabled="%{disabled}" dataType="LimitB"   max="200"  maxlength="200"/>
							    <s:select name="domain.subtype" label="类型" multipleheight="1" multiplewidth="1" required="false" readonly="%{readonly}" disabled="%{disabled}" dataType="LimitB"   max="4"  maxlength="4" list="getCodeItemList('information_subtype')" listKey="value" listValue="name"/>
							 
							    <s:textfield name="domain.creator.name" label="发布人" multipleheight="1" multiplewidth="1" required="false" readonly="true" disabled="%{disabled}" dataType="LimitB"   max="20"  maxlength="20"/>
							    <s:textfield name="domain.createtime" label="创建日期" multipleheight="1" multiplewidth="1" required="false" readonly="true" disabled="%{disabled}" dataType="Date"  >
								<s:param name="value">
							    	    <s:date name="domain.createtime" format="yyyy-MM-dd"/>
							    	</s:param>
							    </s:textfield>
					<%--		    <s:textfield name="domain.publisher.name" label="发布人" multipleheight="1" multiplewidth="1" required="false" readonly="%{readonly}" disabled="%{disabled}" dataType="LimitB"   max="20"  maxlength="20"/>--%>
							    <s:textfield name="domain.publishtime" label="发布日期" multipleheight="1" multiplewidth="1" required="false" readonly="%{readonly}" disabled="%{disabled}" dataType="Date"  >
								<s:param name="value">
							    	    <s:date name="domain.publishtime" format="yyyy-MM-dd"/>
							    	</s:param>
							    </s:textfield>
							    <s:radio label="是否发布" name="domain.isPublish" noborder="true" readonly="%{readonly}" disabled="%{disabled}" required="false" list="getCodeItemList('yes_no_publish')" listKey="value" listValue="name" />
							    <s:radio label="是否使用" name="domain.state" noborder="true" readonly="%{readonly}" disabled="%{disabled}" required="false" list="getCodeItemList('yes_no')" listKey="value" listValue="name" />
							    <s:textfield name="domain.sequence" label="顺序" multipleheight="1" multiplewidth="1" required="false" readonly="%{readonly}" disabled="%{disabled}" dataType="LimitB"   max="4"  maxlength="4"/>
							    <s:textarea name="domain.remark" label="备注"  required="false" multipleheight="2" multiplewidth="2" readonly="%{readonly}" disabled="%{disabled}" dataType="LimitB"   max="2000"  maxlength="2000"/>
				   <%--		       <s:textfield name="domain.browsecount" label="浏览次数" multipleheight="1" multiplewidth="1" required="false" readonly="%{readonly}" disabled="%{disabled}" dataType="LimitB"   max="4"  maxlength="4"/>--%>
  
						   </li>
					   </ul>
					   <ul index="2">
						   <li>
<%--						   		<s:textarea name="domain.content" label="信息内容" multipleheight="16" multiplewidth="2" required="true" readonly="%{readonly}" disabled="%{disabled}" dataType="LimitB"/>--%>
						   			<textarea id="content" name="domain.content" cols="100" rows="8" style="width:736ppx;height:400px;visibility:hidden;" msg="信息内容必填"  require="true"><s:property value="domain.content" escape="true"/></textarea>
						   </li>
					   </ul>
					</div>

				  </div>
				</div>
	    </s:form>  
		<f:container align="left">
				<span class="tip">
					<li>说明：建议文字大小请用12像素大，上传的图片大小长*宽=300*222。</li>	
					<li>注意：复制过来的内容，请先复制到记事本中去掉格式，然后再复制进来，防止影响发布后的格式。</li>	
				</span>
		</f:container>	    
	    <script>
			var kindEditor;
			KindEditor.ready(function(K) {
				kindEditor = K.create('textarea[name="domain.content"]', {
					width : '100%',
					height : '400px',
					cssPath : '<%=path%>/editor/plugins/code/prettify.css',
					uploadJson : '<%=path%>/editor/jsp/upload_json.jsp',
					fileManagerJson : '<%=path%>/editor/jsp/file_manager_json.jsp',
					allowFileManager : true
				});
				prettyPrint();
			});
			$('input[name="channelNames"]').attr("readonly","true"); 
			//同步保存内容
			function initializeSubmit(parameters){
				kindEditor.sync();
		        var value = kindEditor.html(); 
			    return true;
			}	
		</script> 
  </body>
</html>
